package com.football.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;

/**
 * <p>
 * 
 * </p>
 *
 * @author 李越
 * @since 2023-02-18
 */

@ApiModel(value = "球队表", description = "")
@TableName("team")
@Data
public class Team implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("球队id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("球队名称")
    private String teamName;

    @ApiModelProperty("球队图片")
    private String teamImg;

    @ApiModelProperty("教练")
    private String teamCoach;

    @ApiModelProperty("球队简介")
    private String teamProfile;

    @ApiModelProperty("主场球场")
    private String teamHome;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("球队成立时间")
    private Date teamCreate;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)//表示这个字段不存在于这个数据库
    private List<League> leagueList; // 一个球队参加多个联赛

    @TableField(exist = false)
    private Long teamValue; // 球队身价

    @TableField(exist = false)
    private TeamAbility teamAbility; // 球队能力

    @TableField(exist = false)
    private TeamData teamData; // 球队总数据

    @TableField(exist = false)
    private List<Player> players; // 球队阵容

}
